<?php echo form_error('nome');?>
<?php echo form_error('valor');?>
<form action="<?php echo($action);?>" method="post">
	<table border="1">
		<tr>
			<td>* Nome:</td>
			<td><input type="text" name="nome" maxlength="100" required="required" value="<?php echo set_value('nome'); ?>" /></td>
		</tr>
		<tr>
			<td>* Valor:</td>
			<td><input type="text" name="valor" maxlength="6" required="required" value="<?php echo(set_value('valor'));?>"  /></td>
		</tr>
		<tr>
			<td>* Quantidade:</td>
			<td><input type="text" name="quantidade" maxlength="11" required="required" value="<?php echo set_value('quantidade'); ?>" /></td>
		</tr>
		<tr>
			<td>Representante Comercial:</td>
			<td>
				<select name="representanteComercial">
						<option value=""></option>
					<?php foreach ($representantes as $representante):?>
						<option value="<?php echo($representante->id_repres_comercial);?>"><?php echo($representante->tx_nome);?></option>
					<?php endforeach;?>

				</select>
			</td>
		</tr>
		
		<tr>
			<td></td>
			<td><input type="submit" value="Cadastrar" /></td>
		</tr>
	</table>
</form>
* campos obrigatorios